home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 1.toast / pc / sample code / devices and hardware / disks / iso9660 / errormsg.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  1.5 KB  |  57 lines

  1. /*
  2.     File:        ErrorMsg.h
  3.     
  4.     Description:
  5.  
  6.     Author:        
  7.  
  8.     Copyright:     Copyright: © 1990-1999 by Apple Computer, Inc.
  9.                 all rights reserved.
  10.     
  11.     Disclaimer:    You may incorporate this sample code into your applications without
  12.                 restriction, though the sample code has been provided "AS IS" and the
  13.                 responsibility for its operation is 100% yours.  However, what you are
  14.                 not permitted to do is to redistribute the source as "DSC Sample Code"
  15.                 after having made changes. If you're going to re-distribute the source,
  16.                 we require that you make it clear in the source that the code was
  17.                 descended from Apple Sample Code, but that you've made changes.
  18.     
  19.     Change History (most recent first):
  20.                 6/24/99    Updated for Metrowerks Codewarror Pro 2.1(KG)
  21.  
  22. */
  23. #include <stdio.h>
  24. #include <Dialogs.h>
  25. #include <strings.h>
  26.  
  27. #include "HighSierra.h"
  28. #include "BuildISO.h"
  29. #include "DialogUtils.h"
  30.  
  31. #include "ErrorMsg.h"
  32.  
  33. /************************************************************************
  34.  *
  35.  *  Function:        ErrorMsg
  36.  *
  37.  *  Purpose:        tell user about some error
  38.  *
  39.  *  Returns:        nothing
  40.  *
  41.  *  Side Effects:    displays an error message
  42.  *
  43.  *  Description:    we assume that you are passing stuff in as if you
  44.  *                    were using printf.  Put up a dialog that tells what
  45.  *                    went wrong using your message.
  46.  *
  47.  ************************************************************************/
  48. void
  49. ErrorMsg(char *a, ...)
  50. {
  51.     char    errorString[255];
  52.     
  53.     sprintf(errorString, a);
  54.     C2PStr(errorString);
  55.     ParamText((StringPtr)errorString, NULL, NULL, NULL);
  56.     Alert(DU_CenterALRT(129), 0L);
  57. }